async function checkconfig() {
  wx.cloud.init({
    env: 'cloud1-1gf0pek44e15f87b',
  })
  const db = wx.cloud.database()
	let res = await   db.collection("config").where({
    name: 'switch'
  }).get().then({
    success: (res) => {
      console.log(res)
    }
  })
  console.log(res.data)
  if(res.data[0].switch){
    return true
  }else{
    return false
  }
}

module.exports = {
  checkconfig
}